<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>spGpu library: Core Routines</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">spGpu library
   &#160;<span id="projectnumber">1.2.1</span>
   </div>
   <div id="projectbrief">spgpu</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Core Routines</div>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structspgpu_handle_struct.html">spgpuHandleStruct</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">this struct should be modified only internally by spgpu  <a href="structspgpu_handle_struct.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga36e050ff0ebc2a3c31854957e3f85b39">__host</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">__host pointers reference host allocations (it's just a placeholder)  <a href="#ga36e050ff0ebc2a3c31854957e3f85b39"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga208309018bbf41da4094eb99cf27210c">__device</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">__device pointers reference device allocations (it's just a placeholder)  <a href="#ga208309018bbf41da4094eb99cf27210c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga738cd87f2695116dae7cdcb1c5033009">SPGPU_SUCCESS</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gac78eb6660c2548c08d0b038ec1e10ebc">SPGPU_UNSUPPORTED</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga3113a429dcdd0e506b588f2791cbbcc6">SPGPU_UNSPECIFIED</a>&#160;&#160;&#160;2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga804344b9a14244b699ac3d900674b38b">SPGPU_OUTOFMEMORY</a>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga387e4a139242aa4eac70604cb9575e75">SPGPU_TYPE_INT</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gabba2587348d636e5f8778b4d746a53b5">SPGPU_TYPE_FLOAT</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga5edcbde8d535e04f2692ef990224e179">SPGPU_TYPE_DOUBLE</a>&#160;&#160;&#160;2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga3f2c326f3b40b15efe7b7eebee65b74a">SPGPU_TYPE_COMPLEX_FLOAT</a>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga872d3de18347fb15856c6991d23a1145">SPGPU_TYPE_COMPLEX_DOUBLE</a>&#160;&#160;&#160;4</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gabc4e5bdeb8bba07f8ee5714f4b469104">cuFloatComplex_isZero</a>(a)&#160;&#160;&#160;(a.x == 0.0f &amp;&amp; a.y == 0.0f)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gaa6d0f03d203be83dfdebdcd5e55f6585">cuDoubleComplex_isZero</a>(a)&#160;&#160;&#160;(a.x == 0.0 &amp;&amp; a.y == 0.0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gae8cd262e7cae13dce26878b1eeaaf97e">cuFloatComplex_isNotZero</a>(a)&#160;&#160;&#160;(a.x != 0.0f || a.y != 0.0f)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gabe811dd595c97b86791e4e07ae518328">cuDoubleComplex_isNotZero</a>(a)&#160;&#160;&#160;(a.x != 0.0 || a.y != 0.0)</td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga499c53ab7ac159a3ab6636ef11ddcb1a">spgpuStatus_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The return code for synchronous functions.  <a href="#ga499c53ab7ac159a3ab6636ef11ddcb1a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga6403dea459dde9675081ba6a27577fc8">spgpuType_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Code to identify a primitive type.  <a href="#ga6403dea459dde9675081ba6a27577fc8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structspgpu_handle_struct.html">spgpuHandleStruct</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga8eb1b903ee4c760010a1ab71e78595c8">SpgpuHandleStruct</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">this struct should be modified only internally by spgpu  <a href="#ga8eb1b903ee4c760010a1ab71e78595c8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef const <a class="el" href="group__core_fun.html#ga8eb1b903ee4c760010a1ab71e78595c8">SpgpuHandleStruct</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A spGPU handle represents a single CUDA device on your platform.  <a href="#ga5d4825ac610d6524df843758da392dec"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__core_fun.html#ga499c53ab7ac159a3ab6636ef11ddcb1a">spgpuStatus_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga8ddfe4e902655f41b59f739c8b161d84">spgpuCreate</a> (<a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a> *pHandle, int device)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gaf5297b2482fc100ffe263503278ec187">spgpuDestroy</a> (<a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a> pHandle)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga4a47a16ad6294b67fde76e71360cb9d4">spgpuStreamCreate</a> (<a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a> pHandle, cudaStream_t *stream)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga2e6370e0f2c4040a1fd9e7092a9e933b">spgpuStreamDestroy</a> (cudaStream_t stream)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga7d54bf94f7e8ed4d2004235d83cff6ce">spgpuSetStream</a> (<a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a> pHandle, cudaStream_t stream)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cudaStream_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gaea7f2e596694f5e8436a26cb86dee393">spgpuGetStream</a> (<a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a> pHandle)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gaa3a379eb5f8a632897bcdfa6f3dff19d">spgpuSizeOf</a> (<a class="el" href="group__core_fun.html#ga6403dea459dde9675081ba6a27577fc8">spgpuType_t</a> typeCode)</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ga208309018bbf41da4094eb99cf27210c"></a><!-- doxytag: member="core.h::__device" ref="ga208309018bbf41da4094eb99cf27210c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __device</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>__device pointers reference device allocations (it's just a placeholder) </p>

</div>
</div>
<a class="anchor" id="ga36e050ff0ebc2a3c31854957e3f85b39"></a><!-- doxytag: member="core.h::__host" ref="ga36e050ff0ebc2a3c31854957e3f85b39" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __host</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>__host pointers reference host allocations (it's just a placeholder) </p>

</div>
</div>
<a class="anchor" id="gabe811dd595c97b86791e4e07ae518328"></a><!-- doxytag: member="core.h::cuDoubleComplex_isNotZero" ref="gabe811dd595c97b86791e4e07ae518328" args="(a)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cuDoubleComplex_isNotZero</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a</td><td>)</td>
          <td>&#160;&#160;&#160;(a.x != 0.0 || a.y != 0.0)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="gaa6d0f03d203be83dfdebdcd5e55f6585"></a><!-- doxytag: member="core.h::cuDoubleComplex_isZero" ref="gaa6d0f03d203be83dfdebdcd5e55f6585" args="(a)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cuDoubleComplex_isZero</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a</td><td>)</td>
          <td>&#160;&#160;&#160;(a.x == 0.0 &amp;&amp; a.y == 0.0)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="gae8cd262e7cae13dce26878b1eeaaf97e"></a><!-- doxytag: member="core.h::cuFloatComplex_isNotZero" ref="gae8cd262e7cae13dce26878b1eeaaf97e" args="(a)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cuFloatComplex_isNotZero</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a</td><td>)</td>
          <td>&#160;&#160;&#160;(a.x != 0.0f || a.y != 0.0f)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="gabc4e5bdeb8bba07f8ee5714f4b469104"></a><!-- doxytag: member="core.h::cuFloatComplex_isZero" ref="gabc4e5bdeb8bba07f8ee5714f4b469104" args="(a)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cuFloatComplex_isZero</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a</td><td>)</td>
          <td>&#160;&#160;&#160;(a.x == 0.0f &amp;&amp; a.y == 0.0f)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ga804344b9a14244b699ac3d900674b38b"></a><!-- doxytag: member="core.h::SPGPU_OUTOFMEMORY" ref="ga804344b9a14244b699ac3d900674b38b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_OUTOFMEMORY&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ga738cd87f2695116dae7cdcb1c5033009"></a><!-- doxytag: member="core.h::SPGPU_SUCCESS" ref="ga738cd87f2695116dae7cdcb1c5033009" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_SUCCESS&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ga872d3de18347fb15856c6991d23a1145"></a><!-- doxytag: member="core.h::SPGPU_TYPE_COMPLEX_DOUBLE" ref="ga872d3de18347fb15856c6991d23a1145" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_TYPE_COMPLEX_DOUBLE&#160;&#160;&#160;4</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ga3f2c326f3b40b15efe7b7eebee65b74a"></a><!-- doxytag: member="core.h::SPGPU_TYPE_COMPLEX_FLOAT" ref="ga3f2c326f3b40b15efe7b7eebee65b74a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_TYPE_COMPLEX_FLOAT&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ga5edcbde8d535e04f2692ef990224e179"></a><!-- doxytag: member="core.h::SPGPU_TYPE_DOUBLE" ref="ga5edcbde8d535e04f2692ef990224e179" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_TYPE_DOUBLE&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="gabba2587348d636e5f8778b4d746a53b5"></a><!-- doxytag: member="core.h::SPGPU_TYPE_FLOAT" ref="gabba2587348d636e5f8778b4d746a53b5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_TYPE_FLOAT&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ga387e4a139242aa4eac70604cb9575e75"></a><!-- doxytag: member="core.h::SPGPU_TYPE_INT" ref="ga387e4a139242aa4eac70604cb9575e75" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_TYPE_INT&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ga3113a429dcdd0e506b588f2791cbbcc6"></a><!-- doxytag: member="core.h::SPGPU_UNSPECIFIED" ref="ga3113a429dcdd0e506b588f2791cbbcc6" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_UNSPECIFIED&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="gac78eb6660c2548c08d0b038ec1e10ebc"></a><!-- doxytag: member="core.h::SPGPU_UNSUPPORTED" ref="gac78eb6660c2548c08d0b038ec1e10ebc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_UNSUPPORTED&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga5d4825ac610d6524df843758da392dec"></a><!-- doxytag: member="core.h::spgpuHandle_t" ref="ga5d4825ac610d6524df843758da392dec" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef const <a class="el" href="group__core_fun.html#ga8eb1b903ee4c760010a1ab71e78595c8">SpgpuHandleStruct</a>* <a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A spGPU handle represents a single CUDA device on your platform. </p>

</div>
</div>
<a class="anchor" id="ga8eb1b903ee4c760010a1ab71e78595c8"></a><!-- doxytag: member="core.h::SpgpuHandleStruct" ref="ga8eb1b903ee4c760010a1ab71e78595c8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structspgpu_handle_struct.html">spgpuHandleStruct</a>  <a class="el" href="group__core_fun.html#ga8eb1b903ee4c760010a1ab71e78595c8">SpgpuHandleStruct</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>this struct should be modified only internally by spgpu </p>

</div>
</div>
<a class="anchor" id="ga499c53ab7ac159a3ab6636ef11ddcb1a"></a><!-- doxytag: member="core.h::spgpuStatus_t" ref="ga499c53ab7ac159a3ab6636ef11ddcb1a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int <a class="el" href="group__core_fun.html#ga499c53ab7ac159a3ab6636ef11ddcb1a">spgpuStatus_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The return code for synchronous functions. </p>

</div>
</div>
<a class="anchor" id="ga6403dea459dde9675081ba6a27577fc8"></a><!-- doxytag: member="core.h::spgpuType_t" ref="ga6403dea459dde9675081ba6a27577fc8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int <a class="el" href="group__core_fun.html#ga6403dea459dde9675081ba6a27577fc8">spgpuType_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Code to identify a primitive type. </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga8ddfe4e902655f41b59f739c8b161d84"></a><!-- doxytag: member="core.h::spgpuCreate" ref="ga8ddfe4e902655f41b59f739c8b161d84" args="(spgpuHandle_t *pHandle, int device)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__core_fun.html#ga499c53ab7ac159a3ab6636ef11ddcb1a">spgpuStatus_t</a> spgpuCreate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a> *&#160;</td>
          <td class="paramname"><em>pHandle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>device</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create a spgpu context for a GPU device. Every call to spgpu routines using this handle will execute on the same GPU. This is re-entrant, so it will work if used by multiple host threads. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pHandle</td><td>outputs the handle </td></tr>
    <tr><td class="paramname">device</td><td>id of the device to be used by this context </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaf5297b2482fc100ffe263503278ec187"></a><!-- doxytag: member="core.h::spgpuDestroy" ref="gaf5297b2482fc100ffe263503278ec187" args="(spgpuHandle_t pHandle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spgpuDestroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a>&#160;</td>
          <td class="paramname"><em>pHandle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destroy the spgpu context for pHandle. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pHandle</td><td>the handle previously created with <a class="el" href="group__core_fun.html#ga8ddfe4e902655f41b59f739c8b161d84">spgpuCreate()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaea7f2e596694f5e8436a26cb86dee393"></a><!-- doxytag: member="core.h::spgpuGetStream" ref="gaea7f2e596694f5e8436a26cb86dee393" args="(spgpuHandle_t pHandle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cudaStream_t spgpuGetStream </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a>&#160;</td>
          <td class="paramname"><em>pHandle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the current stream from the handle pHandle. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pHandle</td><td>the handle from which get the stream. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga7d54bf94f7e8ed4d2004235d83cff6ce"></a><!-- doxytag: member="core.h::spgpuSetStream" ref="ga7d54bf94f7e8ed4d2004235d83cff6ce" args="(spgpuHandle_t pHandle, cudaStream_t stream)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spgpuSetStream </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a>&#160;</td>
          <td class="paramname"><em>pHandle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cudaStream_t&#160;</td>
          <td class="paramname"><em>stream</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Change the current stream for the handle pHandle. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pHandle</td><td>the handle to configure. </td></tr>
    <tr><td class="paramname">stream</td><td>the stream to use for next spgpu routines call. Use 0 to reset to the default stream. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa3a379eb5f8a632897bcdfa6f3dff19d"></a><!-- doxytag: member="core.h::spgpuSizeOf" ref="gaa3a379eb5f8a632897bcdfa6f3dff19d" args="(spgpuType_t typeCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t spgpuSizeOf </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__core_fun.html#ga6403dea459dde9675081ba6a27577fc8">spgpuType_t</a>&#160;</td>
          <td class="paramname"><em>typeCode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the size, in bytes, of the type denoted by typeCode (e.g. 4 for SPGPU_TYPE_FLOAT, 8 for SPGPU_TYPE_DOUBLE). </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">typeCode</td><td>outputs the handle </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga4a47a16ad6294b67fde76e71360cb9d4"></a><!-- doxytag: member="core.h::spgpuStreamCreate" ref="ga4a47a16ad6294b67fde76e71360cb9d4" args="(spgpuHandle_t pHandle, cudaStream_t *stream)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spgpuStreamCreate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a>&#160;</td>
          <td class="paramname"><em>pHandle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cudaStream_t *&#160;</td>
          <td class="paramname"><em>stream</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create a cuda stream according to the device of the spgpu handle. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">stream</td><td>outputs the new stream </td></tr>
    <tr><td class="paramname">pHandle</td><td>the handle used to obtain the device id for the stream </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga2e6370e0f2c4040a1fd9e7092a9e933b"></a><!-- doxytag: member="core.h::spgpuStreamDestroy" ref="ga2e6370e0f2c4040a1fd9e7092a9e933b" args="(cudaStream_t stream)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spgpuStreamDestroy </td>
          <td>(</td>
          <td class="paramtype">cudaStream_t&#160;</td>
          <td class="paramname"><em>stream</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destroy a stream, previously created with <a class="el" href="group__core_fun.html#ga4a47a16ad6294b67fde76e71360cb9d4">spgpuStreamCreate()</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">stream</td><td>the stream to destroy </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Tue Oct 7 2014 23:31:15 for spGpu library by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5
</small></address>

</body>
</html>
